<?php if (0 < count($new_firms)):?>
    <h2 class="mp_name_menu_category"><?php echo Yii::t('app', 'Недавно добавленные фирмы'); ?></h2>
    <?php foreach($new_firms as $new_firm):?>
    <?php 
        $firm_lnk = Yii::app()->createUrl('/firm', array('id'=>$new_firm->id, 'slug'=> $new_firm->slug));
        $service_lnk = Yii::app()->createUrl('/rubrics', array('st_id' => $new_firm->service_type));
        $rubric_lnk = Yii::app()->createUrl('/rubrics/single', array('st_id' => $new_firm->service_type, 'rid' => $new_firm->rubric_id));
        $category_lnk = Yii::app()->createUrl('/category', array('st_id' => $new_firm->service_type,'rid'=>$new_firm->rubric_id, 'cid'=>$new_firm->category_id));
    ?>     
      <div class="mp_grid">
        <div class="mp_firm_item">
          <div class="mp_conteiner">
            <?php if('test' === $new_firm->logo):?>
                <p><a href="<?php echo $firm_lnk;?>"><img src="<?php echo $this->getFirmImgSrc($new_firm->logo, 'firms_img_logo');?>" alt="<?php echo GxHtml::encode($new_firm->title);?>" width="100%"></a></p>
            <?php endif;?>          
            <div class="mp_logoConteiner">
              <a class="mp_logofirm"></a>
            </div>						
            <div class="mp_name">
                <a href="<?php echo $firm_lnk;?>"><?php echo GxHtml::encode($new_firm->title);?></a>
            </div>
          </div>
          <div class="rubriki">
            <nav class="mp_rubriki">
              <ul>
                <li><a href="<?php echo $service_lnk;?>"><?php echo Controller::getServiceType($new_firm->service_type);?></a></li>
                <li><a href="<?php echo $rubric_lnk;?>"><?php echo $new_firm->rubric;?></a></li>
                <li><a href="<?php echo $category_lnk;?>"><?php echo $new_firm->category;?></a></li>
              </ul>
            </nav>
          </div>
        </div>
      </div>	    
    <?php endforeach;?>
<?php endif;?>
        <?php //Debug::dump(Yii::app()->basestatic->rubrics(0));?>

<article class="vip-items">
	<?php if ('' != $block_nine) :?>
    <h3><?php echo Yii::t('app', 'Топ 9'); ?></h3>
    <?php echo $block_nine;?>
	<?php endif;?>
</article>
